package bcMedTests;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

import bcMedBeans.PlanoSaude;
import bcMedEntity.EntityDataBase;
import bcMedEntity.EntityDataBaseRead;

public class NewTest {
	
	EntityDataBase testeDb;
	
	@BeforeClass
	public void setUp() {
		testeDb = new EntityDataBase();
	}	
	
	
	@Test
	public void testDrivePresente() {
		assert testeDb.isDriverPresent();
	}
	
	@Test
	public void testLePlanoSaudePorID() {
		int id=1;
		testeDb.connectDataBase();
		EntityDataBaseRead dbRead = new EntityDataBaseRead(testeDb);
		PlanoSaude planoTeste = dbRead.readPlanoSaude(id);
		System.out.println(">>>Lido Nome: " + planoTeste.getNome());
		assert planoTeste.getNome().equals("unimed");
	}	

	
}
